<template>
    <div class="gathering">
        <div class="data-content">
            <Form :model="formdata" label-position="right" :label-width="160">
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="支付宝：" prop="file_alipay">
                            <Upload class="disinblock"
                                    :before-upload="handleUpload_alipay"
                                    :action="action_alipay">
                                <Button icon="ios-cloud-upload-outline">选择文件</Button>
                            </Upload>
                            <div class="disinblock pl10" v-if="formdata.file_alipay !== null">{{ formdata.file_alipay.name }}
                                <Button class="ml10" @click="upload('alipay')" :loading="loadingStatus_alipay"> 上传 </Button>
                            </div>
                            <div class="disinblock pl10" v-else>未选中任何文件</div>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>支付宝收款二维码</p>
                        <img src="./../../../assets/image/android.png" alt="" style="width: 130px">
                    </Col>
                </Row>

                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="微信：" prop="file_wx">
                            <Upload class="disinblock"
                                    :before-upload="handleUpload_wx"
                                    :action="action_wx">
                                <Button icon="ios-cloud-upload-outline">选择文件</Button>
                            </Upload>
                            <div class="disinblock pl10" v-if="formdata.file_wx !== null">{{ formdata.file_wx.name }}
                                <Button class="ml10" @click="upload('wx')" :loading="loadingStatus_wx"> 上传 </Button>
                            </div>
                            <div class="disinblock pl10" v-else>未选中任何文件</div>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>微信收款二维码</p>
                    </Col>
                </Row>

                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="收款微信号1：" prop="wx_pay_number1">
                            <Input v-model="formdata.wx_pay_number1" />
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>1~32位字符</p>
                    </Col>
                </Row>

                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="收款微信号2：" prop="wx_pay_number2">
                            <Input v-model="formdata.wx_pay_number2" />
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>1~32位字符</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="收款支付宝：" prop="alipay_pay_number">
                            <Input v-model="formdata.alipay_pay_number" />
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>1~32位字符</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="收款银行卡：" prop="bank_pay_number">
                            <Input v-model="formdata.bank_pay_number" />
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>1~20位字符</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="收款银行账户名：" prop="bank_pay_name">
                            <Input v-model="formdata.bank_pay_name" />
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>1~32位字符</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="收款银行开户行：" prop="bank_pay_openbank">
                            <Input v-model="formdata.bank_pay_openbank" />
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>1~32位字符</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="厦门海鸥贸易支付通道：" prop="charge1">
                            <CheckboxGroup v-model="formdata.charge1">
                                <Checkbox label="快捷支付"></Checkbox>
                                <Checkbox label="网关支付"></Checkbox>
                            </CheckboxGroup>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>开启前，请确保海鸥贸易相关参数的正确性，勾选后支持对应的在线支付1、网银支付1</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="睿联支付通道：" prop="charge2">
                            <CheckboxGroup v-model="formdata.charge2">
                                <Checkbox label="快捷支付"></Checkbox>
                                <Checkbox label="网关支付"></Checkbox>
                            </CheckboxGroup>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>开启前，请确保睿联支付相关参数的正确性，开启后支持在线支付2、网银支付2</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="久联联支付通道：" prop="charge3">
                            <CheckboxGroup v-model="formdata.charge3">
                                <Checkbox label="快捷支付"></Checkbox>
                                <Checkbox label="网关支付"></Checkbox>
                            </CheckboxGroup>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>	开启前，请确保久联联支付相关参数的正确性，开启后支持在线支付3、网银支付3</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="支付宝：" prop="alipay_online1">
                            <Select v-model="formdata.alipay_online1" placeholder="">
                                <Option value="open">开启</Option>
                                <Option value="close">关闭</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>	开启前，请确保海鸥贸易相关参数的正确性，开启后支持支付宝二维码付款</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="支付宝(提交凭证)：" prop="alipay_qrcode">
                            <Select v-model="formdata.alipay_qrcode" placeholder="">
                                <Option value="open">开启</Option>
                                <Option value="close">关闭</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>	开启前，请确保已上传支付宝收款二维码</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="微信扫码：" prop="wx_online1">
                            <Select v-model="formdata.wx_online1" placeholder="">
                                <Option value="open">开启</Option>
                                <Option value="close">关闭</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>	开启前，请确保海鸥贸易相关参数的正确性，开启后支持微信二维码付款</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="微信扫码(提交凭证)：" prop="wx_qrcode">
                            <Select v-model="formdata.wx_qrcode" placeholder="">
                                <Option value="open">开启</Option>
                                <Option value="close">关闭</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>开启前，请确保已上传微信收款二维码</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="银行转账(提交凭证)：" prop="bank_charge">
                            <Select v-model="formdata.bank_charge" placeholder="">
                                <Option value="open">开启</Option>
                                <Option value="close">关闭</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>开启前，请确保已上填写正确的收款信息 基本设置</p>
                    </Col>
                </Row>
                <FormItem>
                    <Button type="primary" @click="handleSubmit()" :loading="send_loading">确定</Button>
                </FormItem>

            </Form>

        </div>
    </div>
</template>
<style>
    .gathering .c999 p{
        line-height: 27px;
    }
    .gathering .ivu-form-item{
        margin-bottom: 0;
    }
    .gathering .ivu-input-wrapper ,.gathering .ivu-select{
        width: 250px;
    }
</style>
<script>
    import WrapperContent from '../../../components/wrapper-content.vue'
    import {
        getUserList,
        getUser,
        getLevelList,
        getPositionList,
        doUserInfo,
        delUser,
        changeUserState
    } from "@/api/user";
    import * as utils from '../../../assets/js/utils'
    import $ from 'jquery'
    import _ from 'lodash'

    export default {
        components: {
            WrapperContent
        },
        data() {
            return {
                loading: false,
                formdata: {
                    file_alipay: null,
                    file_wx: null,
                    wx_pay_number1:'',
                    wx_pay_number2:'',
                    alipay_pay_number:'',
                    bank_pay_number:'',
                    bank_pay_name:'',
                    bank_pay_openbank:'',
                    charge1:[],
                    charge2:[],
                    charge3:[],
                    alipay_online1:'open',
                    alipay_qrcode:'open',
                    wx_online1:'open',
                    wx_qrcode:'open',
                    bank_charge:'open',
                },
                send_loading: false,
                loadingStatus_alipay: false,
                action_alipay: '',
                loadingStatus_wx: false,
                action_wx: '',
            }
        },
        created: function () {
            this.loading = false;
        },
        methods: {
            handleSubmit() {
                this.send_loading = true;
                setTimeout(() => {
                    this.send_loading = false;
                }, 2000)
            },
            handleUpload_alipay (file) {
                this.formdata.file_alipay = file;
                return false;
            },
            handleUpload_wx (file) {
                this.formdata.file_wx = file;
                return false;
            },
            upload (type) {
                if(type == 'alipay'){
                    this.loadingStatus_alipay = true;
                    setTimeout(() => {
                        this.formdata.file_alipay = null;
                        this.loadingStatus_alipay = false;
                        this.$Message.success('Success')
                    }, 1500);
                }else if(type == 'wx'){
                    this.loadingStatus_wx = true;
                    setTimeout(() => {
                        this.formdata.file_wx = null;
                        this.loadingStatus_wx = false;
                        this.$Message.success('Success')
                    }, 1500);
                }

            },
        }
    }
</script>





























